package com.fsh.subject.application.controller;

import com.fsh.subject.common.entity.PageResult;
import com.fsh.subject.infra.basic.entity.SubjectInfoEs;
import com.fsh.subject.infra.basic.service.SubjectEsService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
public class TestContorller {

    @Resource
    private SubjectEsService subjectEsService;

    @GetMapping("/search")
    public PageResult<SubjectInfoEs> search(String key){
        SubjectInfoEs subjectInfoEs=new SubjectInfoEs();
        subjectInfoEs.setKeyWord(key);
        return subjectEsService.querySubjectList(subjectInfoEs);
    }

}
